﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="BioInfSearch._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
 <link href="default.css" type="text/css" rel="Stylesheet" />

 <script src="jquery-1.2.6.pack.js" type="text/javascript"></script>

 <script type="text/javascript">
		$(document).ready(function () {
			$('#query').focus();
			
			$('#query').keydown(function(event) {
			  if(event.keyCode == 13)
			   $('#doSearch').click();
		});
			
			Sys.WebForms.PageRequestManager.getInstance().add_endRequest(addEffects);
		});
    
        function addEffects(sender, args)
        {
            if (args.get_error() == undefined)
            {
                $('.abstract').hide();
                $('.toggleAbstract').click(function(e) {
					$(this).parent().find('.abstract').slideToggle('slow');
					if(/^Show/.test($(this).html()))
					 $(this).html('Hide abstract &laquo;');
					else
					 $(this).html('Show abstract &raquo;');
					 
					e.preventDefault();
                });
            }
        }
        
        function query(term)
        {
		 $('#query').val(term);
		 $('#doSearch').click();
        }
 </script>

 <title>BioInformatics Search-- Search NCBI's resources fast!</title>
</head>
<body>
 <form id="form1" runat="server">
 <asp:ScriptManager ID="ScriptManager1" runat="server">
 </asp:ScriptManager>
 <asp:UpdatePanel ID="UpdatePanel1" runat="server">
  <ContentTemplate>
   <div class="content">
	<div class="loader">
	 <asp:UpdateProgress ID="UpdateProgress1" runat="server">
	  <ProgressTemplate>
	   <img class="loader" src="images/ajax-loader2.gif" alt="loader" />
	  </ProgressTemplate>
	 </asp:UpdateProgress>
	</div>
	<div class="searchbar">
	 <img src="images/logo.png" alt="logo" class="logo" />
	 <input type="text" id="query" runat="server" size="40" />
	 <input type="button" id="doSearch" value="Search" onclick="$get('hiddenBtn').click()" />
	 <asp:Button runat="server" ID="hiddenBtn" Width="75px" OnClick="btnSearch_Click"
	  UseSubmitBehavior="false" Style="display: none" />
	</div>
	<div runat="server" id="resultbar" class="resultbar">
			<span class="navbar" id="navbar" runat="server">
				<asp:LinkButton runat="server" ID="prev" OnClick="prev_Click" ><< </asp:LinkButton> 
				page </p><span runat="server" id="pagedisp">0</span>
				<asp:LinkButton runat="server" ID="next" OnClick="next_Click" > >></asp:LinkButton>
			</span>
	</div>
	<input type="hidden" runat="server" id="curpage" value="0" />
	<div class="results" id="results" runat="server">
	</div>
  </ContentTemplate>
 </asp:UpdatePanel>
 </form>
</body>
</html>
